package com.senlingspace.system.service.impl;

import java.util.List;
import com.senlingspace.common.utils.DateUtils;
import com.senlingspace.common.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.senlingspace.system.mapper.SlkjOperateMapper;
import com.senlingspace.system.domain.SlkjOperate;
import com.senlingspace.system.service.ISlkjOperateService;

/**
 * 运营方Service业务层处理
 * 
 * @author wangliang
 * @date 2024-07-15
 */
@Service
public class SlkjOperateServiceImpl implements ISlkjOperateService 
{
    @Autowired
    private SlkjOperateMapper slkjOperateMapper;

    /**
     * 查询运营方
     * 
     * @param operateId 运营方主键
     * @return 运营方
     */
    @Override
    public SlkjOperate selectSlkjOperateByOperateId(Long operateId)
    {
        return slkjOperateMapper.selectSlkjOperateByOperateId(operateId);
    }

    /**
     * 查询运营方列表
     * 
     * @param slkjOperate 运营方
     * @return 运营方
     */
    @Override
    public List<SlkjOperate> selectSlkjOperateList(SlkjOperate slkjOperate) {
        PageUtils.startPage();
        return slkjOperateMapper.selectSlkjOperateList(slkjOperate);
    }

    /**
     * 新增运营方
     * 
     * @param slkjOperate 运营方
     * @return 结果
     */
    @Override
    public int insertSlkjOperate(SlkjOperate slkjOperate)
    {
        slkjOperate.setCreateTime(DateUtils.getNowDate());
        return slkjOperateMapper.insertSlkjOperate(slkjOperate);
    }

    /**
     * 修改运营方
     * 
     * @param slkjOperate 运营方
     * @return 结果
     */
    @Override
    public int updateSlkjOperate(SlkjOperate slkjOperate)
    {
        slkjOperate.setUpdateTime(DateUtils.getNowDate());
        return slkjOperateMapper.updateSlkjOperate(slkjOperate);
    }

    /**
     * 批量删除运营方
     * 
     * @param operateIds 需要删除的运营方主键
     * @return 结果
     */
    @Override
    public int deleteSlkjOperateByOperateIds(Long[] operateIds)
    {
        return slkjOperateMapper.deleteSlkjOperateByOperateIds(operateIds);
    }

    /**
     * 删除运营方信息
     * 
     * @param operateId 运营方主键
     * @return 结果
     */
    @Override
    public int deleteSlkjOperateByOperateId(Long operateId)
    {
        return slkjOperateMapper.deleteSlkjOperateByOperateId(operateId);
    }
}
